// <copyright file="Language.cs" company="Alan Dean">
// The MIT License

// Copyright (c) 2008 Alan Dean

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// </copyright>
// <author>Alan Dean</author>
// <email>alan.dean@thoughtpad.net</email>

namespace Semantic.Rdf
{
    using System;
    using System.Globalization;

    /// <summary>
    /// Provides example languages.
    /// <para>Used for testing purposes.</para>
    /// <para>This class cannot be instantiated directly.</para>
    /// </summary>
    public static class Language
    {
        #region fields

        /// <summary>
        /// Stores the <see cref="M:Semantic.Rdf.Language.English()"/> data.
        /// </summary>
        private static readonly CultureInfo _english = new CultureInfo("en");

        /// <summary>
        /// Stores the <see cref="M:Semantic.Rdf.Language.French()"/> data.
        /// </summary>
        private static readonly CultureInfo _french = new CultureInfo("fr");

        /// <summary>
        /// Stores the <see cref="M:Semantic.Rdf.Language.German()"/> data.
        /// </summary>
        private static readonly CultureInfo _german = new CultureInfo("de");
        
        #endregion

        #region public static CultureInfo English()
        /// <summary>Returns the english language.</summary>
        /// <returns>An instance of the <see cref="T:System.Globalization.CultureInfo"/> class.</returns>
        public static CultureInfo English()
        {
            return _english;
        }
        #endregion

        #region public static CultureInfo English(string)
        /// <summary>
        /// Returns the english language, with the specified <paramref name="region"/>.
        /// </summary>
        /// <param name="region">A 2-character region code.</param>
        /// <returns>An instance of the <see cref="T:System.Globalization.CultureInfo"/> class.</returns>
        public static CultureInfo English(string region)
        {
            return new CultureInfo("en-" + region);
        }
        #endregion

        #region public static CultureInfo French()
        /// <summary>Returns the french language.</summary>
        /// <returns>An instance of the <see cref="T:System.Globalization.CultureInfo"/> class.</returns>
        public static CultureInfo French()
        {
            return _french;
        }
        #endregion

        #region public static CultureInfo German()
        /// <summary>Returns the german language.</summary>
        /// <returns>An instance of the <see cref="T:System.Globalization.CultureInfo"/> class.</returns>
        public static CultureInfo German()
        {
            return _german;
        }
        #endregion
    }
}